Integrand size = 22, antiderivative size = 86 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\frac {d x}{c}-\frac {\left (b^2 d-2 a c d-b c e\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c}}-\frac {(b d-c e) \log \left (a+b x+c x^2\right )}{2 c^2} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {1407, 787, 648, 632, 212, 642} \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=-\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (-2 a c d+b^2 d-b c e\right )}{c^2 \sqrt {b^2-4 a c}}-\frac {(b d-c e) \log \left (a+b x+c x^2\right )}{2 c^2}+\frac {d x}{c} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 787
Rule 1407
Rubi steps \begin{align*} \text {integral}& = \int \frac {x (e+d x)}{a+b x+c x^2} \, dx \\ & = \frac {d x}{c}+\frac {\int \frac {-a d+(-b d+c e) x}{a+b x+c x^2} \, dx}{c} \\ & = \frac {d x}{c}-\frac {(b d-c e) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 c^2}+\frac {\left (b^2 d-2 a c d-b c e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 c^2} \\ & = \frac {d x}{c}-\frac {(b d-c e) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {\left (b^2 d-2 a c d-b c e\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c^2} \\ & = \frac {d x}{c}-\frac {\left (b^2 d-2 a c d-b c e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c}}-\frac {(b d-c e) \log \left (a+b x+c x^2\right )}{2 c^2} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.00 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\frac {2 c d x+\frac {2 \left (b^2 d-2 a c d-b c e\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}+(-b d+c e) \log (a+x (b+c x))}{2 c^2} \]
[In]
[Out]
Time = 0.12 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.05
method | result | size |
default | \(\frac {d x}{c}+\frac {\frac {\left (-b d +e c \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (-d a -\frac {\left (-b d +e c \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{c}\) | \(90\) |
risch | \(\text {Expression too large to display}\) | \(1357\) |
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 291, normalized size of antiderivative = 3.38 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\left [\frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d x + {\left (b c e - {\left (b^{2} - 2 \, a c\right )} d\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) - {\left ({\left (b^{3} - 4 \, a b c\right )} d - {\left (b^{2} c - 4 \, a c^{2}\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}, \frac {2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} d x + 2 \, {\left (b c e - {\left (b^{2} - 2 \, a c\right )} d\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - {\left ({\left (b^{3} - 4 \, a b c\right )} d - {\left (b^{2} c - 4 \, a c^{2}\right )} e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 423 vs. \(2 (82) = 164\).
Time = 0.71 (sec) , antiderivative size = 423, normalized size of antiderivative = 4.92 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right ) \log {\left (x + \frac {- a b d - 4 a c^{2} \left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right ) + 2 a c e + b^{2} c \left (- \frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right )}{2 a c d - b^{2} d + b c e} \right )} + \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right ) \log {\left (x + \frac {- a b d - 4 a c^{2} \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right ) + 2 a c e + b^{2} c \left (\frac {\sqrt {- 4 a c + b^{2}} \cdot \left (2 a c d - b^{2} d + b c e\right )}{2 c^{2} \cdot \left (4 a c - b^{2}\right )} - \frac {b d - c e}{2 c^{2}}\right )}{2 a c d - b^{2} d + b c e} \right )} + \frac {d x}{c} \]
[In]
[Out]
Exception generated. \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.38 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.97 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\frac {d x}{c} - \frac {{\left (b d - c e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c^{2}} + \frac {{\left (b^{2} d - 2 \, a c d - b c e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{2}} \]
[In]
[Out]
Time = 0.13 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.48 \[ \int \frac {d+\frac {e}{x}}{c+\frac {a}{x^2}+\frac {b}{x}} \, dx=\frac {\ln \left (c\,x^2+b\,x+a\right )\,\left (d\,b^3-e\,b^2\,c-4\,a\,d\,b\,c+4\,a\,e\,c^2\right )}{2\,\left (4\,a\,c^3-b^2\,c^2\right )}+\frac {d\,x}{c}-\frac {\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,x}{\sqrt {4\,a\,c-b^2}}\right )\,\left (-d\,b^2+c\,e\,b+2\,a\,c\,d\right )}{c^2\,\sqrt {4\,a\,c-b^2}} \]
[In]
[Out]